// components/orderSheet/orderItem.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    // itemChecked: {
    //   type: Boolean,
    //   value: false
    // },
    itemId: {
      type: String,
      value: '1'
    },
    itemNum: {
      type: Number,
      value: 1
    },
    itemImgSrc: {
      type: String,
      value: '../../images/cart/item.jpg'
    },
    itemName: {
      type: String,
      value: 'MAGIC DRAGON魔杰龙轻柔倍适学步裤'
    },
    itemDescrition: {
      type: String,
      value: '尺寸：L'
    },
    itemPrice: {
      type: String,
      value: '138.00'
    },
    ordersn: {
      type: String,
      value: '1'
    },
  },
  observers:{
    'ordersn':function(val){
      this.setData({
        order_sn:val
      })
    }
  },
  /**
   * 组件的初始数据
   */
  data: {
    imgPath: "/images",
    order_sn:''
  },

  /**
   * 组件的方法列表
   */
  methods: {
 
    goo_details(){
      wx.navigateTo({
        url: '/pages/orderSheet/orderDetails?order_sn=' + this.data.order_sn,
      })
      //console.log(this.data.order_sn);
    }
  },
  lifetimes: {
    attached() {
      const util = require("../../utils/util")
      this.setData({
        imgPath: util.getImgPath()
      })

      this.setData({
        //itemImgSrc:this.data.imgPath+"/cart/item.jpg"
      })
    }
  }
})